Skip to content

[for minor release] feat: remove the python2 pilot starter#8339

Open
fstagni wants to merge 1 commit intoDIRACGrid:integrationfrom
fstagni:remove_py2_pilot
Open

[for minor release] feat: remove the python2 pilot starter#8339
fstagni wants to merge 1 commit intoDIRACGrid:integrationfrom
fstagni:remove_py2_pilot

Conversation

@fstagni
Copy link
Copy Markdown
Contributor

@fstagni fstagni commented Oct 13, 2025

In the spirit of DIRACGrid/Pilot#266. This one is optional.

If this one is merged, it fully halts all python2 support for pilots. So, we can wait longer before merging.

BEGINRELEASENOTES

*WMS
NEW: remove support for python2 pilots

ENDRELEASENOTES

@fstagni fstagni force-pushed the remove_py2_pilot branch 2 times, most recently from 79fa9de to d4bfc37 Compare October 14, 2025 08:42
@fstagni fstagni changed the title feat: remove the python2 pilot starter [9.0] feat: remove the python2 pilot starter Oct 14, 2025
@fstagni fstagni changed the title [9.0] feat: remove the python2 pilot starter [9.1] feat: remove the python2 pilot starter Oct 14, 2025
@aldbr aldbr linked an issue Feb 4, 2026 that may be closed by this pull request
1 task
@aldbr aldbr linked an issue Feb 19, 2026 that may be closed by this pull request
@fstagni fstagni marked this pull request as ready for review March 20, 2026 14:48
@fstagni fstagni changed the title [9.1] feat: remove the python2 pilot starter [for minor release] feat: remove the python2 pilot starter Mar 20, 2026
@fstagni
Copy link
Copy Markdown
Contributor Author

fstagni commented Mar 20, 2026

This PR is ready. Given that Pilot removed the support for Python2 at the beginning of this week, and no complains were received, I assume this is ready to be merged.

Comment on lines 67 to 70
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cStringIO does not exist in python3 (https://docs.python.org/3.3/whatsnew/3.0.html?highlight=cstringio):

The StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively.

Suggested change
from io import StringIO

# if we get here we break out of the loop of locations
break
except (url_library_URLError, Exception) as e:
except (URLError, Exception) as e:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the URLError is redundant here no?

Suggested change
except (URLError, Exception) as e:
except Exception as e:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[9.0] Optimising PilotWrapper size? [Bug]: Dropping python2 support

3 participants